<%--
  返工
  User: Ivan
  Date: 2019-09-03 9:41
--%>
<style type="text/css">
tr, th, td {
    text-align: center;
}
</style>

<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="${SYS_QUERY_PATH}" method="post">
        <div class="bjui-searchBar">
            <g:hiddenField name="EXPORT_CONTENT_NAME" value="Excel"/>
            <g:hiddenField name="SYS_QUERY_NAME" value="${SYS_QUERY_NAME}"/>
            <label>返工日期<strong><span class="text-danger">*</span></strong>：</label>
            <input type="text" name="reworkStartTime" class="form-control" data-rule="required"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd" placeholder="FROM"
                   size="11" id="start-date-input" value="${reworkStartTime}"/>&nbsp;
            <input type="text" name="reworkEndTime" class="form-control" data-rule="required"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd" placeholder="TO"
                   size="11" id="end-date-input" value="${reworkEndTime}"/>&nbsp;
            <label>返工类别<strong><span class="text-danger"></span></strong>：</label>
            %{--<g:textField name="reworkType" value="${reworkType}" size="17" placeholder="返工类别"/>&nbsp;--}%
            <g:select name="reworkType" from="${reworkTypeList}" data-toggle="selectpicker" data-width="130"
                      data-live-search="true" optionKey="REWORK_TYPE" optionValue="REWORK_DESC"
                      value="${reworkType}" noSelection="['': '-- All --']"/>&nbsp;
            <label>返工工段<strong><span class="text-danger"></span></strong>：</label>
            %{--<g:textField name="reworkStep" value="${reworkStep}" size="17" placeholder="返工工段"/>&nbsp;--}%
            <g:select name="reworkStep" from="${reworkStepList}" data-toggle="selectpicker" data-width="130"
                      data-live-search="true" optionKey="STEP_NAME" optionValue="STEP_DESC"
                      value="${reworkStep}" noSelection="['': '-- All --']"/>&nbsp;
            <label>在制工段<strong><span class="text-danger"></span></strong>：</label>
            %{--<g:textField name="wipStep" value="${wipStep}" size="17" placeholder="在制工段"/>&nbsp;--}%
            <g:select name="wipStep" from="${wipStepList}" data-toggle="selectpicker" data-width="130"
                      data-live-search="true" optionKey="STEP_NAME" optionValue="STEP_DESC"
                      value="${wipStep}" noSelection="['': '-- All --']"/>&nbsp;
            <label>客户<strong><span class="text-danger"></span></strong>：</label>
            <g:textField name="customName" value="${customName}" size="17" placeholder="客户"/>
            <br/><br/>
            <label>装置<strong><span class="text-danger"></span></strong>：</label>
            <g:textField name="deviceName" value="${deviceName}" size="17" placeholder="装置"/>&nbsp;
            <label>部件<strong><span class="text-danger"></span></strong>：</label>
            <g:textField name="partName" value="${partName}" size="17" placeholder="部件"/>&nbsp;
            <label>受入日期<strong><span class="text-danger"></span></strong>：</label>
            <input type="text" name="srStartTime" class="form-control" placeholder="FROM"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd"
                   size="11" id="start-date-input" value="${srStartTime}"/>
            <input type="text" name="srEndTime" class="form-control" placeholder="TO"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd"
                   size="11" id="start-date-input" value="${srEndTime}"/>&nbsp;
            <label>计划出荷日期<strong><span class="text-danger"></span></strong>：</label>
            <input type="text" name="fhStartTime" class="form-control" placeholder="FROM"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd"
                   size="11" id="end-date-input" value="${fhStartTime}"/>
            <input type="text" name="fhEndTime" class="form-control" placeholder="TO"
                   data-toggle="datepicker" data-pattern="yyyy-MM-dd"
                   size="11" id="start-date-input" value="${fhEndTime}"/>
            <br/><br/>
            <label>刻印号<strong><span class="text-danger"></span></strong>：</label>
            <g:textField name="markNum" value="${markNum}" size="17" placeholder="刻印号"/>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>&nbsp;
            <button type="button" class="btn-blue"
                    onclick="javascript:bjuiExportExl('#pagerForm', '${request.getContextPath()}/Base/exportExcel')"
                    data-icon="file-excel-o" title="导出Excel">导出</button>
        </div>
    </form>
</div>

<div class="bjui-pageContent tableContent">
    <g:if test="${report_011.size() > 0}">
        <table class="table table-bordered table-hover table-striped table-top" data-selected-multi="true" data-toggle="tablefixed" data-width="200%">
            <thead>
            <tr>
                <th width="50">NO.</th>
                <g:each in="${tableHeadList}" status="i" var="headInstance">
                    <g:if test="${headInstance != 'RN'}">
                        <th><g:message code="${headInstance}" default="${headInstance}"/></th>
                    </g:if>
                </g:each>
            </tr>
            </thead>
            <tbody>
            <g:each in="${report_011}" status="i" var="dataInstance">
                <tr data-id="data">
                    <td>${dataInstance.RN}</td>
                    <g:each in="${tableHeadList}" status="j" var="headInstance">
                        <g:if test="${headInstance != 'RN'}">
                            <td>${dataInstance["${headInstance}"]}</td>
                        </g:if>
                    </g:each>
                </tr>
            </g:each>
            </tbody>
        </table>
    </g:if>
    <g:else>
        <g:render template="../template/emptyPanel"/>
    </g:else>
</div>
<g:render template="../template/pagination"/>